Repeat digital message transmission between a microprocessor monitoring circuit and an analyzing tool

ABSTRACT

The invention concerns a method for transmitting digital messages through output terminals ( 22 ) of a monitoring circuit ( 18 ) incorporated in a microprocessor ( 12 ) during execution of a series of instructions, the digital messages representing characteristic data stored by the monitoring circuit upon detecting a specific event in the execution of the series of instructions, one of said data corresponding to an identifier of said specific event, said method comprising the following steps: comparing the data of the last two detected specific events having a common identifier, if the compared data are identical, incrementing a repeat counter associated with said specific event; and if the compared data are different, transmitting a digital message representing the data of the last detected specific event, and furthermore, if the content of the repeat counter associated with said specific event is other than zero, transmitting a digital message indicating a repeat of the specific event.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the testing of microprocessors. It morespecifically relates to a method and device of digital data transmissionbetween a monitoring circuit integrated in a microprocessor chip and ananalysis tool.

2. Related Art

FIG. 1 schematically shows an integrated circuit 10 comprising amicroprocessor (μP) 12, an internal memory (MEM) 14, and input/outputterminals (I/O) 16. Microprocessor 12 is intended to execute a programor a software stored in memory 14. Under control of the program,microprocessor 12 may process data provided by input/output terminals 16or stored in memory 14 and read or write data through input/outputterminals 16.

To check the proper operation of the microprocessor, a monitoringcircuit 18 is generally integrated in integrated circuit 10. Monitoringcircuit 18 is capable of reading specific data provided bymicroprocessor 12 on execution of a program, and of possibly processingthe read data. Test terminals 22 connect monitoring circuit 18 to ananalysis tool 24. Analysis tool 24 may process the received signals, forexample, according to commands provided by a user, and ensure a detailedanalysis of the operation of microprocessor 12. In particular, analysistool 24 may determine the program instruction sequence really executedby microprocessor 12.

The number of test terminals 22 may be on the same order of magnitude asthe number of input/output terminals 16, for example, from 200 to 400terminals. Test terminals 22 as well as the connections of monitoringcircuit 18 take up a significant silicon surface area, which causes anunwanted increase in the circuit cost. For this purpose, a first versionof integrated circuit 10 comprising monitoring circuit 18 and testterminals 22 is produced in small quantities to debug the program ofmicroprocessor 12 or “user program”. After this debugging, a version ofintegrated circuit 10 without monitoring circuit 18 and of testterminals 22 is sold. This requires forming two versions of theintegrated circuit, which requires a significant amount of work and isrelatively expensive. Further, the final chip is not necessarilyidentical to the tested chip.

To overcome the above-mentioned disadvantages, it is desired to form amonitoring circuit 18 which takes up a reduced surface area and onlyrequires a reduced number of test terminals 22, which decreases the costof the monitoring circuit. Monitoring circuit 18 can then be left on thefinally sold integrated circuit 10.

It is thus desired to decrease the number of signals provided bymonitoring circuit 18. For this purpose, certain logic operations aredirectly performed at the level of monitoring circuit 18 on the datameasured at the level of microprocessor 12 to only transmit messageshaving an important information content.

Thus, standard IEEE-ISTO-5001 in preparation provides1 in its 1999version, accessible, for example, on websitewww.ieee-isto.org/Nexus5001, a specific message exchange protocolbetween a monitoring circuit and an analysis tool for a monitoringcircuit 18 requiring but a reduced number of test terminals 22.

Among the messages provided by monitoring circuit 18 according tostandard IEEE-ISTO-5001, a message indicates the occurrence of a jump inthe program executed by microprocessor 12. A jump corresponds to thepassing from an initial instruction of the program to a destinationinstruction other than the instruction which follows the initialinstruction in the sequence of instructions forming the program. Basedon the jump messages transmitted by monitoring circuit 18, analysis tool24 reconstitutes the sequence of instructions executed by microprocessor12. The sequence of reconstituted instructions can then be compared witha sequence of instructions theoretically executed by microprocessor 12to determine malfunctions of microprocessor 12.

Standard IEEE-ISTO-5001 defines a jump message formed of a headeridentifying the type of jump from among different types of jumpsdetectable by the monitoring circuit and of an integer indicating thenumber of instructions executed by the microprocessor since the lasttransmission of a jump message and, if necessary of data representativeof the destination instruction address.

A program executed by a microprocessor generally comprises loops, a loopcorresponding to the repetition, a number of times, of a sequence ofinstructions, a jump being performed from the last instruction of theloop to the first instruction of the loop. In specific applications,especially in telephony, the program may comprise a significant numberof loops of small size. As an example, the copying of the content of amemory may be performed by a loop containing a single instruction andthat can be implemented, according to the used technologies, by one ortwo operation clock cycles of the microprocessor.

Current microprocessors currently operate at clock frequencies reaching400 MHz. However, according to the technologies used, the maximumfrequency of transmission of messages by monitoring circuit 18 on testterminals 22 is generally limited to some hundred megahertz. Onexecution of a loop of small size, the frequency at which messagesrepresentative of the loop jumps should be transmitted by monitoringcircuit 18 on test terminals 22 may exceed the maximum transmissionfrequency. This results in a saturation of the monitoring circuit whichcan no longer provide messages properly.

Further, according to standard IEEE-ISTO-5001, monitoring circuit 18 canprovide a message each time microprocessor 12 executes an instructionfor reading data stored in memory 14 or an instruction for writing datainto memory 14. Accordingly, when a loop of small size comprises a reador write instruction, monitoring circuit 18 must transmit, on testterminals 22, in addition to the messages representative of the loopjumps, messages representative of the read or write operations, whichcan increase the risks of saturation of monitoring circuit 18.

SUMMARY OF THE INVENTION

The present invention aims at a method and a circuit for transmittingdigital messages, through output terminals of a monitoring circuitintegrated to a microprocessor, indicating the occurrence of specificevents on execution of the program by the microprocessor, and which doesnot exhibit the previously-mentioned disadvantage.

To achieve this and other objects, the present invention provides amethod for transmitting digital messages through output terminals of amonitoring circuit integrated to a microprocessor on execution of aninstruction sequence by the microprocessor, each digital message beingrepresentative of characteristic data stored by the monitoring circuiton detection of a specific event from among several specific events inthe execution of the instruction sequence, one of said datacorresponding to an identifier of said specific event, comprising thesteps of comparing the characteristic stored data of the last twodetected specific events corresponding to a same identifier; if thecompared data are identical, incrementing a repetition counterassociated with said specific event; and if the compared data aredifferent, transmitting a digital message representative of the datacharacteristic of the last detected specific event and, further, if thecontent of the repetition counter associated with said specific event isdifferent from zero, transmitting a digital message indicating arepetition of the specific event.

According to an embodiment of the present invention, the digital messageindicating a repetition of the specific event comprises the content ofthe repetition counter associated with said specific event.

According to an embodiment of the present invention, the method furthercomprises the step of resetting the repetition counter associated withsaid specific event after transmission of a digital message indicating arepetition of the specific event.

According to an embodiment of the present invention, the characteristicdata comprise the number of instructions executed by the microprocessorbetween the last two detected specific events.

According to an embodiment of the present invention, the specific eventis a jump in the instruction sequence executed by the microprocessor.

According to an embodiment of the present invention, the characteristicstored data comprise data representative of the address of thedestination instruction of the last detected jump.

According to an embodiment of the present invention, the specific eventis a read or write instruction in the instruction sequence executed bythe microprocessor.

According to an embodiment of the present invention, the method furthercomprises the steps of transmitting a digital message indicating arepetition of the specific event if the content of the repetitioncounter associated with said specific event is greater than a determinedthreshold; and setting the repetition counter associated with saidspecific event to zero.

The present invention also provides a device for transmitting digitalmessages between a monitoring circuit integrated to a microprocessor andan analysis tool, on execution of an instruction sequence by themicroprocessor, comprising a means for detecting a specific event fromamong several specific events in the execution of the instructionsequence; a means for storing data characteristic of the detectedspecific event, one of said characteristic data corresponding to anidentifier of the specific event; and a means for transmitting a digitalmessage representative of the stored characteristic data, comprising ameans for comparing stored characteristic data of the last two detectedspecific events corresponding to a same identifier; a means forincrementing a repetition counter associated with said specific eventwhen the comparison means provides a signal indicating that the compareddata are identical, the transmission means being capable of transmittinga message representative of the data characteristic of the last detectedspecific event when the comparison means provides a signal indicatingthat the compared data are different and, further, of transmitting adigital message indicating a repetition of the specific event when theincrementation means provides a signal indicating that the content ofthe repetition counter associated with said specific event is differentfrom zero.

According to an embodiment of the present invention, the incrementationmeans is further capable of setting the repetition counter associatedwith said specific event to zero when the transmission means transmits adigital message indicating a repetition of the specific event.

BRIEF DESCRIPTION OF THE DRAWING

The foregoing object, features, and advantages of the present invention,as well as others, will be discussed in detail in the followingnon-limiting description of specific embodiments in connection with theaccompanying drawings, among which:

FIG. 1, previously described, very schematically shows the architectureof a chip integrating a microprocessor and a monitoring device; and

FIG. 2 shows in the form of a block diagram an example of implementationof the method of digital message transmission by the monitoring circuitaccording to the present invention.

DETAILED DESCRIPTION

The present invention relates to the transmission of digital messagesbetween a monitoring circuit integrated to the chip of a microprocessorand an analysis tool, for example, according to an architecture similarto that of FIG. 1. Monitoring circuit 18 is capable of transmitting toanalysis tool 24 different messages when specific events occur onexecution of a program by microprocessor 12. The coding of the digitalmessage may correspond to the coding described in standardIEEE-ISTO-5001. For example, monitoring circuit 18 transmits to analysistool 24 a message indicating the detection of a jump in the execution ofthe program by microprocessor 12. A jump can be imposed by a specificinstruction of the program or be caused by elements of the circuit ofmicroprocessor 12. A repetition of the same instruction sequence of theprogram a number of times is, for example, obtained by a jump imposed bycircuit elements of microprocessor 12. A jump may for example besystematically caused when microprocessor 12 receives an alert signalindicating a low charge level of the supply battery of circuit 10.Monitoring circuit 18 also transmits to the tool a message indicatingthe detection of a read or write operation on execution of the programby microprocessor 12. To determine the number of repetitions of a samemessage which should be provided by monitoring circuit 18 several timesin a row, monitoring circuit 18 comprises a repetition counter initiallyset to 0 and associated with a specific message.

FIG. 2 describes in the form of a block diagram an example ofimplementation of the method of digital message transmission betweenmonitoring circuit 18 and analysis tool 24.

The digital message transmission method comprises, when the same messageshould be transmitted by monitoring circuit 18 several times in a row onexecution of the program by microprocessor 12, of transmitting themessage only once, and of transmitting a message indicating the numberof repetitions of the message.

At step 30, monitoring circuit 18 has detected a specific event onexecution of the program stored in memory 14 by microprocessor 12 whichnormally leads to the transmission of a message by monitoring circuit 18to analysis tool 24. Monitoring circuit 18 then stores specific datacharacteristic of the detected event. In particular, in the case wherethe detected event is a jump, stored data correspond to an identifier ofthe detected jump type. Other stored data correspond to the number ofinstructions executed by microprocessor 12 between the detected jump andthe previously-detected jump. Other stored data may correspond to thedestination address of the jump. The storage of such data may benecessary to analysis tool 24, when the jump results from a jumpinstruction which controls a jump to a program instruction located at anaddress defined by a variable that can take different values. In thecase where the detected event is a read or write operation, stored datacorrespond to an identifier indicating whether it is a read or writeoperation. Other stored data correspond to the value of the stored orread data. Other stored data may be representative of the address of anarea of memory 14 where the data are stored or read. The method thencarries on to step 31.

At step 31, monitoring circuit 18 compares the stored datacharacteristic of the event detected at step 30 with the stored dataassociated with the last detected event corresponding to the sameidentifier. The comparison is performed for data of same nature. As anexample, when the event is a jump, the comparison is performed forexample both on the number of instructions performed since thepreviously-detected jump, the destination address if available, etc.When the event is a read operation, the comparison is performed forexample both on the value of the read data and the address of the memoryarea from which the data are read. If the last two events detected bythe monitoring circuit having a same identifier are identical, themethod carries on at step 32.

At step 32, monitoring circuit 18 increases the repetition counterassociated with the event detected at step 30. No message is thentransmitted to analysis tool 24.

If, at step 31, the last two detected events corresponding to a sameidentifier are not identical, the method carries on to step 33.

At step 33, monitoring circuit 18 checks whether the content of therepetition counter associated with the event detected at step 30 isequal to 0.If so, the method carries on to step 34.

At step 34, monitoring circuit 18 transmits to analysis tool 24 via testterminals 22 a message representative of the event detected at step 30.In the case where the detected event is a jump, the message may comprisein the concatenation of the stored characteristic data and comprise aheader identifying the nature of the jump, the number of instructionsperformed since the preceding jump detection, the address of the jumpdestination instruction if available, etc.

If, at step 33, the content of the repetition counter associated withthe event detected at step 30 is different from 0, the method carries onto step 35.

At step 35, monitoring circuit 18 transmits to analysis tool 24 via testterminals 22 a repetition message that may be formed, for example, of aheader indicating that it is a repetition message and of the content ofthe repetition counter associated with the event detected at step 30.The repetition counter is then set back to 0 and the method carries onto step 34 at which monitoring circuit 18 provides analysis tool 24 witha message representative of the event detected at step 30.

The present invention enables reducing the number of digital messagestransmitted by monitoring circuit 18 to analysis tool 24 when severalevents which would cause the transmission by the monitoring circuit ofidentical messages are successively detected by monitoring circuit 18.For example, the present invention thus enables, in the case of loops ofsmall size where the frequency of jumps may become significant,maintaining the transmission frequency of digital messages on testterminals 22 under the maximum authorized transmission frequency.

According to a variation of the present invention, when at step 33, therepetition counter associated with a specific event reaches a thresholdvalue, monitoring circuit 18 transmits a message especially comprisingthe threshold value of the repetition counter, followed by a messagerepresentative of the specific event, and resets the loop repetitioncounter to 0. This enables avoiding, for example in the case where aloop is repeated a significant number of times, that no message istransmitted to analysis tool 24 for too long a time period.

Of course, the present invention is likely to have various alterations,modifications, and improvements which will readily occur to thoseskilled in the art. For example, a repetition message may be used forcertain specific events only, a message being specifically provided tothe analysis tool by the monitoring circuit for the other events.

Such alterations, modifications, and improvements are intended to bepart of this disclosure, and are intended to be within the spirit andthe scope of the present invention. Accordingly, the foregoingdescription is by way of example only and is not intended to belimiting. The present invention is limited only as defined in thefollowing claims and the equivalents thereto.

1. A method for transmitting digital messages through output terminalsof a monitoring circuit integrated to a microprocessor on execution ofan instruction sequence by the microprocessor, each digital messagebeing representative of characteristic data stored by the monitoringcircuit on detection of a specific event from a plurality of specificevents in the execution of the instruction sequence, the methodcomprising: comparing characteristic stored data of a specific eventhaving an identifier with characteristic stored data of a lastpreviously detected specific event having the same identifier todetermine whether the specific event and the last previously detectedspecific event are identical; when it is determined that the specificevent and the last previously detected specific event are identical,incrementing a repetition counter associated with said specific event;and when it is determined that the specific event and the lastpreviously detected specific event are different; transmitting a digitalmessage representative of the data characteristic of the specific eventthrough at least one output terminal of the monitoring circuit; and,when content of the repetition counter associated with said specificevent is different from zero, transmitting a digital message indicatinga number of repetitions of the specific event, the number of repetitionsis determined by a value of the repetition counter.
 2. The method ofclaim 1, further comprising resetting the repetition counter associatedwit said specific event after transmission of the digital messageindicating a number of repetitions of the specific event.
 3. The methodof claim 1, wherein the characteristic data comprise a number ofinstructions executed by the microprocessor between the last twodetected specific events.
 4. The method of claim 1, wherein the specificevent is a jump in the instruction sequence executed by themicroprocessor and the last previously detected specific event has thesame identifier in a last detected jump.
 5. The method of claim 4,wherein the characteristic stored data of the specific event comprisedata representative of an address of a destination instruction of thejump and the characteristic stored data of the last previously detectedspecific event comprise data representative of an address of adestination instruction of the last detected jump.
 6. The method ofclaim 1, wherein the specific event is a read or write instruction inthe instruction sequence executed by the microprocessor.
 7. The methodof claim 1, further comprising: transmitting a digital messageindicating a repetition of the specific event if the content of therepetition counter associated with said specific event is greater than adetermined threshold; and setting the repetition counter associated withsaid specific event to zero.
 8. A device for transmitting digitalmessages between a monitoring circuit integrated with a microprocessorand an analysis tool, on execution of an instruction sequence by themicroprocessor, comprising: means for detecting a specific event from aplurality of specific events in the execution of the instructionsequence, the specific event having an identifier; means for storingdata characteristic of the detected specific event; means fortransmitting a digital message representative of the storedcharacteristic data; means for comparing the characteristic data of thedetected specific event with characteristic stores data of a lastpreviously detected specific event having the same identifier todetermine whether the detected specific event and the last previouslydetected specific event are identical; and means for incrementing arepetition counter associated with said detected specific event andindicating a number of repetitions of the detected specific event whenthe comparison means provides a signal indicating that the detectedspecific event and the last previously detected specific event areidentical; wherein the transmission means is configured to:transmitting, through at least one output terminal of the monitoringcircuit, a message representative of the data characteristic of thedetected specific event when the comparison means provides a signalindicating that the detected specific event and the last previouslydetected specific event are different; and transmitting a digitalmessage indicating a repetition of the detected specific event when theincrementation means provides a signal indicating that content of therepetition counter associated with said detected specific event isdifferent from zero.
 9. The device of claim 8, in which theincrementation means is further capable of setting the repetitioncounter associated with said specific event to zero when thetransmission means transmits a digital message indicating a repetitionof the specific event.
 10. The device of claim 8, wherein the digitalmessage indicating the repetition of the detected specific eventcomprises the content of the repetition counter associated with saidspecific event.
 11. The device of claim 8, further comprising means forresetting the repetition counter associated with the detected specificevent after transmission of the digital message indicating therepetition of the specific event.
 12. The device of claim 8, wherein thecharacteristic data comprise the number of instructions executed by themicroprocessor between the last two detected specific events.
 13. Thedevice of claim 8, wherein the detected specific event is a jump in theinstruction sequence executed by the microprocessor and the lastpreviously detected specific event corresponding to the same identifierin a last detected jump.
 14. The device of claim 13, wherein thecharacteristic stored data of detected the specific event comprise datarepresentative of an address of a destination instruction of the jumpand the characteristic stored data of the last previously detectedspecific event comprise data representative of an address of adestination instruction of the last detected jump.
 15. The device ofclaim 8, wherein the specific event is a read or write instruction inthe instruction sequence executed by the microprocessor.